package figureAndGraph;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 功能描述: 节点
 * 2024/07/01
 *
 * @author ZhangYi
 */
//@Data
public class Node<T> {
    /**
     * 值
     */
    public T value;
    /**
     * 入度
     */
    public int in;
    /**
     * 出度
     */
    public int out;

    /**
     * 与当前节点直接相邻的节点
     */
    public List<Node<T>> nextNodes;
    /**
     * 与当前节点直接相邻的边
     */
    public List<Edge<T>> nextEdges;

    public Node(T value) {
        this.value = value;
        this.in = 0;
        this.out = 0;
        this.nextNodes = new ArrayList<>();
        this.nextEdges = new ArrayList<>();
    }
}
